package com.cong.project.model.enums;

/**
 *  收藏状态枚举类
 *
 * @author 聪
 */
public enum CollectStatusEnum {
    /**
     * 点赞状态枚举类
     */
    IS_COLLECT(1, "收藏"),

    NO_COLLECT(0, "未收藏");


    private final int code;

    /**
     * 状态码信息
     */
    private final String message;



    CollectStatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public static CollectStatusEnum geEnumByValue(Integer code){
        if (code==null){
            return null;
        }
        CollectStatusEnum[] values = CollectStatusEnum.values();
        for (CollectStatusEnum teamStatusEnum : values) {
            if (teamStatusEnum.getCode() ==code){
                return teamStatusEnum;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
